import Layout from '@/layout'
const presaleRouter = {
  path: '/presale',
  component: Layout,
  alwaysShow: true,
  redirect: '/presale/data',
  name: 'Presale',
  meta: {
    type: 'I',
    roles: ['2210', '2220'],
    title: '预收',
    icon: 'collect'
  },
  children: [{
    path: 'data',
    component: () => import('@/views/presale/data'),
    name: 'PresaleData',
    meta: {
      type: 'I',
      roles: ['2210'],
      title: '预收单'
    }
  }, {
    path: 'add',
    component: () => import('@/views/presale/add'),
    hidden: true,
    name: 'PresaleAdd',
    meta: {
      type: 'I',
      roles: ['2210', '221010', '221020', '221030', '221040', '221050', '221060', '221070', '221080', '221090', '221092'],
      title: '新增预收单'
    }
  }, {
    path: 'modify',
    component: () => import('@/views/presale/add'),
    name: 'PresaleModify',
    hidden: true,
    meta: {
      type: 'I',
      roles: ['2210'],
      title: '编辑预收单'
    }
  }, {
    path: 'detail',
    component: () => import('@/views/presale/add'),
    name: 'PresaleDetail',
    hidden: true,
    meta: {
      type: 'I',
      roles: ['2210'],
      title: '查看预收单'
    }
  }, {
    path: 'returned',
    component: () => import('@/views/presale/returned'),
    name: 'PresaleReturnedData',
    meta: {
      type: 'I',
      roles: ['2220', '222010', '222020', '222030', '222040', '222050', '222060', '222070', '222080', '222090', '222092'],
      title: '预收退款'
    }
  }, {
    path: 'returnedAdd',
    component: () => import('@/views/presale/returnedAdd'),
    hidden: true,
    name: 'PresaleReturnedAdd',
    meta: {
      type: 'I',
      roles: ['2220'],
      title: '新增预收退款'
    }
  }, {
    path: 'returnedModify',
    component: () => import('@/views/presale/returnedAdd'),
    name: 'PresaleReturnedModify',
    hidden: true,
    meta: {
      type: 'I',
      roles: ['2220'],
      title: '编辑预收退款'
    }
  }, {
    path: 'returnedDetail',
    component: () => import('@/views/presale/returnedAdd'),
    name: 'PresaleReturnedDetail',
    hidden: true,
    meta: {
      type: 'I',
      roles: ['2220'],
      title: '查看预收退款'
    }
  }]
}

export default presaleRouter
